/**
 @name: 名称
 @description: 全局入口文件
 @author: macro
 @time: 2024/6/4 23:07
 */
import { createApp } from 'vue'
import App from './App.vue'

// app
let app= createApp(App)

// 引入全局样式
import '@/styles/index.scss'

/*引入路由并注册 stat*/
import router from './router'
app.use(router);
/*引入路由并注册 end*/

/*pinia注册 stat*/
import {pinia} from "@/store/index.ts"
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
pinia.use(piniaPluginPersistedstate);
app.use(pinia)
/*pinia注册 stat*/

/*全局注册插件 start*/
import gloablComponent from './components/index';
app.use(gloablComponent);
/*全局注册插件 end*/

//svg插件需要配置代码
import 'virtual:svg-icons-register'

/*引入element plus start*/
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
app.use(ElementPlus, {
    locale: zhCn
})
/*引入element plus end*/

//挂载
app.mount('#app')
